package com.jk.smartelderlycare.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jk.smartelderlycare.dto.sysVideo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface sysVideoMapper extends BaseMapper<sysVideo> {

/**
 * @description: 后端分页查询
 * @param: [video, page]
 * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.jk.smartelderlycare.dto.sysVideo>
 * @author hhk
 * @date: 2024/11/15 9:00
 */
    IPage<sysVideo> findSysVideoPaginationList(@Param(value = "video") sysVideo video, Page<sysVideo> page);
    /**
     * @description: 新增中间表
     * @param: [map]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 9:16
     */
    void addSysVideoAndLabel(HashMap<String, Object> map);
    /**
     * @description: 删除中间表
     * @param: [videoId]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 9:16
     */
    @Delete("delete from sys_video_label where video_id = #{videoId}")
    void deleteVideoAndLabelByVideoId(Long videoId);
    /**
     * @description: 根据id回显
     * @param: [videoId]
     * @return: com.jk.smartelderlycare.dto.sysVideo
     * @author hhk
     * @date: 2024/11/15 9:16
     */
    sysVideo findSysVideoByVideoId(Long videoId);
    /**
     * @description: 导出
     * @param: []
     * @return: java.util.List<com.jk.smartelderlycare.dto.sysVideo>
     * @author hhk
     * @date: 2024/11/15 11:51
     */
    List<sysVideo> findSysVideoList();
}